﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<mediatheque.Areas.Admin.Models.Members>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("../Layout/admin_menu"); %>
    <ul class="breadcrumb">
        <li class="active"><a href="/Admin/Members">Tous les membres</a> <span class="divider">&raquo;</span></li>
    </ul>
    <h2>Tous les membres</h2>
    <table class="table table-bordered table-striped">
        <thead>
            <tr>
                <th>#ID</th>
                <th>Login</th>
                <th>Email</th>
                <th>Role</th>
            </tr>
        </thead>
    <% foreach (var item in Model.getMembers())
       { %>
        <tr>
            <td><%= item.id %></td>
            <td><%= item.username %></td>
            <td><%= item.email %></td>
            <td><% if (item.role_id == 1) { Response.Write("<strong>Admin</strong>"); } else { Response.Write("Utilisateur"); } %></td>
            <td>
                <a href="/Admin/Members/Edit/<%= item.id %>" class="btn btn-primary btn-mini"><i class="icon-edit icon-white"></i></a>
                <a href="/Admin/Members/Delete/<%= item.id %>" class="btn btn-danger btn-mini"><i class="icon-remove icon-white"></i></a>
            </td>
        </tr>
    <% } %>
    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

